home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ CoolSwitch Settings.xpl < prev    next >
Text File  |  2002-04-12  |  2KB  |  76 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="2"
  3. "COUNT"="2"
  4. "UIPATH"="Appearance\Interface\Cool Switch (ALT+TAB)"
  5. "NAME"="Cool Switch Settings"
  6. "VERSION"="1.37"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Columns"
  9. "TEXT 2"="Rows"
  10. "DESCRIPTION 1"="If you press ALT+TAB, you perform a so called "Cool Switch"."
  11. "DESCRIPTION 2"="Normally, Windows displays seven columns and three rows in this dialog but you can change these values here."
  12. "DESCRIPTION 3"="To restore the original values, clear both fields.  Default values are Columns 7, Rows 3."
  13. "DESCRIPTION 4"="Note: These settings have no effect when you are using Windows 95."
  14. "AUTHOR"="Xteq Systems"
  15. "CONTACTURL"="http://www.xteq.com"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"=" "
  18. "COMMENT 2"=" "
  19. "COMMENT 3"="Thanks to Andrew Roberts (alr@autoprt.co.uk) for the bug fix."
  20.  
  21.  
  22. 'Declaration of some constants
  23. sP="HKCU\Control Panel\Desktop\"
  24. sV1="CoolSwitchColumns"
  25. sv2="CoolSwitchRows"
  26.  
  27. 'Called when the Plugin is started
  28. Sub Plugin_Initialize
  29.  i=RegReadValue(sp & sv1)
  30.  SetUIElement 1,i
  31.  
  32.  i=RegReadValue(sp & sv2)
  33.  SetUIElement 2,i
  34. End Sub
  35.  
  36. 'Called when the Plugin should validate the Data the user has entered
  37. Sub Plugin_CheckData(ElementIndex)
  38. End Sub
  39.  
  40. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  41.  '//Always activate CoolSwitch
  42.  Call RegWriteValue(sp & "CoolSwitch","1",1)
  43.  
  44.  i=GetUIElement(1)
  45.  Call WriteStuff(sp & sv1,i)
  46.  
  47.  i=GetUIElement(2)
  48.  Call WriteStuff(sp & sv2,i)
  49.  
  50.  Call Restart
  51. End Sub
  52.  
  53. Sub WriteStuff(Path,Value)
  54.  if len(value)>0 then
  55.     'Activate it (note: changed from DWORD to STRING - work for NT machines)
  56.     Call RegWriteValue(Path,Value,1)
  57.  else
  58.     'Deactivate it!
  59.  
  60.     s=RegReadValue(Path)
  61.     if IsEmpty(s)=false then
  62.        'Value exists
  63.        Call RegDeleteValue(Path)
  64.     end if
  65.  
  66.  end if
  67. End Sub
  68.  
  69.  
  70.  
  71. 'Called when the Plugin is about to be removed from memory
  72. Sub Plugin_Terminate
  73. End Sub
  74.  
  75.  
  76.